import 'package:flutter/material.dart';
import 'package:grint/widget/report_dialog.dart';

/// 举报功能帮助类
class ReportHelper {
  /// 举报内容
  static void reportContent(
    BuildContext context, {
    required String contentId,
    String? authorId,
    String? contentType,
  }) {
    FankuiTanchuangBangzhu.xianshi(
      context,
      mubiaoNeirongId: contentId,
      mubiaoyonghuId: authorId,
      onJubao: (jubaoLeixing, fujiaxinxi) {
        _handleContentReport(
          contentId: contentId,
          authorId: authorId,
          contentType: contentType,
          jubaoLeixing: jubaoLeixing,
          fujiaxinxi: fujiaxinxi,
        );
      },
    );
  }

  /// 处理内容举报
  static void _handleContentReport({
    required String contentId,
    String? authorId,
    String? contentType,
    required JubaoLeixing jubaoLeixing,
    String? fujiaxinxi,
  }) {}

  /// 获取举报类型字符串
  static String _getReportTypeString(JubaoLeixing jubaoLeixing) {
    switch (jubaoLeixing) {
      case JubaoLeixing.pornographicVulgarity:
        return 'pornographicVulgarity';
      case JubaoLeixing.hateSpeech:
        return 'hateSpeech';
      case JubaoLeixing.nauseating:
        return 'nauseating';
      case JubaoLeixing.illegal:
        return 'illegal';
      case JubaoLeixing.spam:
        return 'spam';
      case JubaoLeixing.other:
        return 'other';
      case JubaoLeixing.block:
        return 'block';
    }
  }
}
